package com.redoor.app.stake.basicdata.mq.sendService;

import com.aliyun.openservices.ons.api.SendCallback;
import com.aliyun.openservices.ons.api.SendResult;
import com.redoor.app.stake.basicdata.model.BussinessTypeEnum;

public interface SendMQService {
    /**
     * 同步发送
     * @param topic
     * @param tag
     * @param message
     * @return
     */
    SendResult sendMessage(String topic, String tag, String message,BussinessTypeEnum.MQ_BUSINESS_TYPE type);

    /**
     * 同步发送--可以根据key值查找消息
     * @param topic
     * @param tag
     * @param key
     * @param message
     * @return
     */
    SendResult sendMessage(String topic, String tag, String key, String message,BussinessTypeEnum.MQ_BUSINESS_TYPE type);

    /**
     * 异步发送
     * @param topic
     * @param tag
     * @param message
     * @param sendCallback
     * @return
     */
    void sendAsync(String topic, String tag, String message,BussinessTypeEnum.MQ_BUSINESS_TYPE type, SendCallback sendCallback);

    /**
     * 单向发送
     * @param topic
     * @param tag
     * @param message
     * @return
     */
    void sendOneway(String topic, String tag, String message,BussinessTypeEnum.MQ_BUSINESS_TYPE type);
    
}
